<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="description" content="">
		<meta name="author" content="">
		<title></title>

		<!-- Bootstrap core CSS -->
		<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
		<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
		<script type="text/javascript">
			document.getElementsByTagName('html')[0].style.fontSize = window.screen.width / 10 + 'px';

			function changeFrameHeight() {
				var ifm = document.getElementById("myiframe");
				var heigth = document.documentElement.clientHeight-$("nav").outerHeight(true);
				var sheight = ifm.contentWindow.document.documentElement.scrollHeight;
				var h = heigth>sheight?heigth:sheight;
				ifm.style.height = h +'px';
			}
//			console.log(window.location.hash)
			$(function () {
				var arr=['#booking','#bookingTime_list','#cancel','#therapy']
				iframeurl(arr[0]);
				$(".lists").on('click',function () {
					$(".lists").removeClass('sel');
					$(this).addClass('sel');
				iframeurl(arr[$(this).index()-1]);
					
				})
				$(".user1").hover(function (e) {
//					console.log()
					$(".usersele").show()
					e.stopPropagation()
				},function (e) {
					$(".usersele").hide()
					e.stopPropagation()
					
				})
				//登出
				$(".return").on('click',function () {
					window.location.href = '../index.html'
				})
			})
			function iframeurl(url) {
				var src = '';
				switch (url){
					case '#booking':
						src='booking.html'
						break;
					case '#bookingTime_list':
						src='bookingTime_list.html'
						break;
					case '#cancel':
						src='CancelPolicySettings.html'
						break;
					case '#therapy':
						src='therapy.html'
						break;
					default:
						break;
				}
				$("iframe").attr('src',src);
			}
			window.onresize = function() {
				console.log(1)
				changeFrameHeight();
			}
		</script>
	</head>

	<body>

		<nav class="navbar navbar-inverse nav">
			<div class="fl fs4 logo hospitalName">虹の会</div>
			<div class="fl name">
				<p>こんにちは、</p>
				<p>
					今日は<span class="nowTime">2017年6月6日</span>。予約が <span class="cl_yellow bold">4</span>件あります。
				</p>
			</div>
			<div class="fr">
				<ul class="user">
					<li>
						<img src="../images/hospitalLogo.png" class="hospitalImg" />
					</li>
					<li class="user1">
						<img src="../images/icon_user.png" />
						<span class="userName">user</span>
						<img src="../images/icon_down.png"/>
						<ul class="usersele">

							<li class="return">登出</li>
						</ul>
					</li>
				</ul>
			</div>
		</nav>

		<div class="clear content">
			<div class="col-md-2 col-sm-3 left">
				<ul class="list">
					<li class="listTitle">管理目录</li>
					<li class="lists sel">预约管理</li>
					<li class="lists">预约时间设定</li>
					<li class="lists">取消策划设定</li>
					<li class="lists">诊疗管理</li>
				</ul>
			</div>
			<div class="col-md-10 col-sm-9 right">
				<iframe src="therapy.html"  id="myiframe" scrolling="no" onload="changeFrameHeight()" frameborder="0"></iframe>
			</div>
		</div>
		
	</body>

</html>